package com.jsbj.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jsbj.user.entities.SysProject;
import com.jsbj.user.vo.ProStatisticsVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 项目表 Mapper 接口
 * </p>
 *
 * @author jsbj
 * @since 2022-03-07
 */
@Mapper
public interface SysProjectMapper extends BaseMapper<SysProject> {

    List<SysProject> getByUserIdAndTenant(@Param("userId")String userId, @Param("tenantCodes") List<String> toArray);

    List<SysProject> getByUserId(@Param("userId")String userId);

    List<SysProject> getProjectInfoByUserIdStatusProName(Map<String,String> param);

    List<SysProject> getBySystemCode(String systemCode);

    ProStatisticsVo queryProjectStatisticsByTenantCodeAndUserId(List<String> tenantCodes, String userId);

    String getProPrex(@Param("ym")String ym);

    ProStatisticsVo queryProjectStatisticsByTenantCodeAndUserIdAlone(List<String> tenantCodes, String userId);

    List<Map<String, Object>> selectProjectInfoByMenuCode(String menuCode);

    Page<SysProject> getByUserIdAndTenantByPage(Page<SysProject> page, Map<String, Object> params);

    List<SysProject> getProjectInfoByUserIdAll(String userId, List<String> tenantCodes);
}
